//�ƥ����ȥ��ꥢ�˥�������
function InsertToTextarea(Form,Tag){
	if(Form != 0){
		Begin	= Form.selectionStart;
		End		= Form.selectionEnd;
		Text	= Form.value;
		Form.value	= Text.substring(0,Begin) + Tag + Text.substring(End,Text.length);
	}
}

//�ե������˥�������
function InsertToTag(Tag){
	InsertToTextarea(
		GetFocus(),
		Tag
	);
}

//ξ�Ƥ�ʸ��������
function InsertBothEnds(Form, Front, Back) {
	if(Form != 0){
		Begin	= Form.selectionStart;
		End		= Form.selectionEnd;
		Text	= Form.value;
		Form.value	=
			Text.substring(0,Begin) + 
			Front + 
			Text.substring(Begin,End) + 
			Back +
			Text.substring(End,Text.length);

	}
}

//���顼�ɻ��ѥ��ߡ�
function storeCaret (textEl) {
}

//���顼�ɻ��ѥ��ߡ�
function insertAtCaret (textEl, text) {
}